package com.rj.bd.user.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rj.bd.user.dao.UserMapper;
import com.rj.bd.user.entity.User;

/**
 * @DESC M层
 * @author 20565
 *
 */
@Service("userService")
public class UserServiceImpl implements IUserService{

	@Autowired
	public UserMapper userMapper;
	
	public List<User> findAll(User user) {
		List<User> list = userMapper.findAll(user);
		
		return list;
	}

	public void save(User user) {
		// TODO Auto-generated method stub
		userMapper.save(user);
	}

	public void edit(User user) {
		userMapper.update(user);
	}

	public void delete(User user) {
		// TODO Auto-generated method stub
		userMapper.delete(user);
	}

	public List<User> findAll(String loginId) {
		// TODO Auto-generated method stub
		return null;
	}

	public User seletById(String loginId) {
		return userMapper.SelectById(loginId);
	}

}
